package com.wanxi.step07test.service.impl;

import com.wanxi.step07test.dto.ResultDTO;
import com.wanxi.step07test.model.Role;
import com.wanxi.step07test.mapper.RoleMapper;
import com.wanxi.step07test.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class RoleServiceImpl implements RoleService {
    @Autowired
    private RoleMapper roleMapper;


    @Override
    public ResultDTO findAll(Role role) {
        return ResultDTO.builder()
                .code(0)
                .data(roleMapper.findAll(role))
                .build();
    }
}
